#ifndef __SMPCACHE_H_
#define __SMPCACHE_H_
#include "CacheCore.h"


class Cache{

public:
  
  //The actual SESC cache object
  CacheGeneric<StateGeneric<> > *cache;

  //Stats about the events the cache saw during execution
  int numReadHits;
  int numReadMisses;

  int numWriteHits;
  int numWriteMisses;

  Cache(int csize, 
               int cassoc, 
               int cbsize, 
               int caddressable, 
               const char * repPol, 
               bool cskew);
  

  virtual void readLine(uint32_t rdPC, uint32_t addr);
  virtual void writeLine(uint32_t wrPC, uint32_t addr);
  virtual void fillLine(uint32_t addr);

  //Dump the stats for this cache to outFile
  virtual void dumpStatsToFile(FILE* outFile);
  
  int getStateAsInt(unsigned long addr);

};

#endif
